package model.busca;

import java.io.File;
import java.util.HashMap;

import controller.Utils;

public abstract class AbstractBusca implements Buscador {

	protected HashMap<String, HashMap<File, Integer>> indice;

	@SuppressWarnings("unchecked")
	public AbstractBusca() {
		indice = (HashMap<String, HashMap<File, Integer>>) desserializa("search_engine.idx");
	}

	protected static Object desserializa(String fileName) {
		String idxFile = "se/" + fileName;
		return Utils.desserializa(idxFile);
	}

}
